package com.max.back.demo.form;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * DoctorForm
 */
@Data
public class DoctorForm {
    public interface Base {
    }

    public interface Find {
    }

    public interface Delete {
    }
    public interface Update extends Base {

    }
    @NotNull(groups = {Update.class, Delete.class},message = "医生编号不能为空")
    private String id;
    @NotBlank(groups = {Base.class, Update.class},message = "医生名字不能为空")
    @Length(max = 100,groups = {Base.class, Update.class},message = "医生名字长度要小于100")
    private String name;
    @NotNull(groups = {Base.class,Update.class},message = "医生年龄不能为空")
    private int age;
    @NotBlank(groups = {Base.class, Update.class},message = "医生性别不能为空")
    @Length(max = 100,groups = {Base.class, Update.class},message = "医生性别长度要小于100")
    private String sex;
    @NotNull(groups = {Base.class, Update.class},message = "医生生日不能为空")
    private Date birthday;
    @NotBlank(groups = {Base.class, Update.class},message = "医生所在科室不能为空")
    @Length(max = 100,groups = {Base.class, Update.class},message = "医生所在科室长度要小于100")
    private String dept;
    @NotBlank(groups = {Base.class, Update.class},message = "医生手机号不能为空")
    @Length(max = 11,min = 11,groups = {Base.class, Update.class},message = "医生手机号长度要等于11")
    private String phone;

}
